home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1996-05-21 | 7.1 KB | 87 lines | [ TEXT/ttxt]
--<<<- -- Filename: -- impads.sx -- Other Files Required: -- mediaimp.sx, adobject.sx (In the parentDir of theScriptDir) -- database.sx, rawdata.sx (In the scriptDir) -- media(Folder) -- Purpose: -- Imports all the media into a storagecontainer to be used by the -- ClassifiedAds document -- Author: -- Dionn M. Stewart module carData uses ScriptX end in module carData ( -- raw data to import from local classifiedData := #( #(129, "4-Door Sedan", "BMW 325i", 1993, 22500, "1993 BMW 325i, red, w/tan leather interior, fully loaded, very clean, all book and records, extended warrenty, only 51k low miles. $21,500. 408-555-1000", 121, 375), #(130, "4-Door Sedan", "BMW 325i", 1992, 22000, "1992 BMW 325im 1 owner, 30k miles, 4 dr., black leather int./ silver ext., sunroof, ac, ps, CD/cass., exc. cond. moving to Europe, must sell. $20,000 obo. 415-555-0123", 170, 122), #(131, "4-Door Sedan", "BMW 325i", 1987, 23000, "1989 BMW 325i, 92k miles, fully loaded, sunroof, 5 spd., silver w/ black leather int., asking $17,000. 415-555-3210", 390, 250), #(132, "Sport-Utility", "Jeep Cherokee", 1989, 14500, "1989 Jeep Cherokee limited edition. Tan leather int., all records, CD/cass., 5 spd. must sell, $14,500. 415-555-1212", 180, 130), #(133, "Sport-Utility", "Jeep Cherokee", 1993, 15000, "1993 Jeep Cherokee. 20k miles. transfer warrenty. Sunroof, very clean, manual trans., asking $15,000 obo, 408-555-5632", 149, 375), #(134, "Sport-Utility", "Jeep Cherokee", 1992, 13000, "1992 Jeep Cherokee, only 50k low miles. New tires, 5 spd. CD/cass. exlnt. cond., moving, must sell. $13,000 firm. 415-555-6541", 408, 416), #(135, "4-Door Sedan", "Honda Civic", 1993, 12500, "1993 Honda Civic LX, 4 dr. sedan, blk. ext./ gray velour int. Sunroof, pwr windows, ac, 25k miles, must sell, $12,500. 707-555-9953",130, 395), #(136, "2-Door Sedan", "Honda Civic", 1993, 12000, "1993 Honda Civic EX Coupe, this one has it all, cranberry ext./ gray int., ac, ps, windows, CD/ cass. $12,000 obo, 408-555-6936", 370, 160), #(137, "2-Door Sedan", "Honda Civic", 1987, 11500, "1987 Honda Civic LX, 2 dr. sedan, white ext./gray velour int. 5 spd., ac, ps, pdl, cc, tilt, theft-proof Pioneer cass. 82k mi., immed. sale, $8,500, 415-555-6489", 438, 438), #(138, "Sports Car", "Honda Civic", 1993, 14000, "1993 Honda Civic Del Sol 5 spd. 15k miles! all records. trans. warrenty. perf. cond. CD player, hurry won't last at $14,000, 408-555-7848", 370, 199), #(139, "Sports Car", "Honda Civic", 1993, 15000, "1993 Honda Civic Del Sol manual trans., loaded, CD/ cass. must sell, I'm pregnant with twins! make offer $15,000 415-555-6321",135, 361), #(140, "4-Door Sedan", "Achieva", 1993, 9000, "1993 Olds. Achieva, low miles, exlnt. cond., 1 owner. blue ext./tan cloth int. includes pull-out Kenwood stereo. $9,000 obo. 415-555-8956", 197, 140), --#(141, "4-Door Sedan", "VW Jetta", 1991, 8000, "1991 VW Jetta GL, 5 spd., am-fm stereo, new tires, 38k mi., sunroof, ps, only $8,000, obo. 415-5553485", 130, 361), --#(142, "4-Door Sedan", "VW Jetta", 1992, 9500, "1992 VW Jetta, exlnt cond., 1 owner, has all records, ac, pwr windows, CD/ cass., make offer $10,000, 408-555-2456", 401, 432), --#(143, "4-Door Sedan", "VW Jetta", 1992, 11000, "1992 VW Jetta, 35k easy miles, turquoise ext./ drk. blue int. ac, ps, 5spd., Wolfsberg edition, alloys, $11,000 obo., 415-555-2465", 170, 130), #(144, "Station Wagon", "Honda Civic", 1992, 10000, "1992 Honda Civic EX wagon, rose gray ext. w/drk. gray int. fully loaded, sunroof, make offer, $10,000, 510-555-4152", 360, 271), #(145, "Station Wagon", "Honda Civic", 1992, 11000, "1992 Honda Civic LX wagon, airbags, pwr, tilt, 25k mi., super clean, all records, CD/ cass., moving must sell $11,000, 415-555-8785", 424, 429), #(146, "2-Door Sedan", "Acura Legend", 1991, 23000, "1991 Acura Legend Coupe, rose gray ext. w/ lt. tan leather int. super clean, low mi., 5 spd., divorce forces sale, $23,000, 408-555-6699", 370, 252), #(147, "2-Door Sedan", "Acura Legend", 1992, 25000, "1992 Acura Legend Coupe, 5 spd., all pwr., black w/ tan leather, moonroof, 23k miles, CD player, $25,000 obo, 510-555-1411", 430, 402), #(148, "Convertible", "Mazda Miata", 1991, 11500, "1991 Mazda Miata, cass., alloys, exlnt. cond., all records, low miles, death forces sale, $11,500. 408-555-4665", 170, 141), #(149, "Convertible", "Mazda Miata", 1992, 17000, "1992 Mazda Miata, special edition year, blk. w/ tan leather, BBS wheels, wood int. decor, super clean, $17,000 obo, 415-555-5231", 390, 279), #(150, "Convertible", "Mazda Miata", 1993, 14000, "1993 Mazda Miata, B package, pwr windows, ac, CD/cass., only 15k mi., hurry, won't last, $14,000, 415-555-6987",159, 370), #(151, "2-Door Sedan", "Toyota Corolla", 1992, 10000, "1992 Toyota Corolla, 4 cyl., 5 spd., great economy car, red ext. w/ gray int., am-fm cass., only 26k miles, asking $10,000, 510-555-7845",150, 391), #(152, "2-Door Sedan", "Toyota Corolla", 1992, 10900, "1992 Toyota Corolla, at, ac, rear spoiler, 29k miles, 1 owner, very clean car, cranberry/drk. gray, $10,900 obo, 415-555-9889", 391, 190), #(153, "Sports Car", "Mazda RX7", 1992, 28000, "1992 Mazda RX7. almost new!, 20k miles, silver ext. w/ black leather int., ABS, CD/cass., airbags, pregnant, must sell $28,000, 408-555-6523", 420, 250), #(154, "Sports Car", "Ford Probe", 1992, 10000, "1992 Ford Probe GT, 5 spd., fully loaded, trans. warrenty, 25k miles!, very clean in and out, $10,000, will trade, 415-555-3748",371, 180), #(155, "Sports Car", "Ford Probe", 1990, 6500, "1990 Ford Probe, 5 spd., grey/grey ext./ int., am-fm cass., great cond., 50k miles., never had problems, $6,500 obo, 415-555-6542", 407, 403), #(156, "Sports Car", "Ford Probe", 1990, 7200, "1990 Ford Probe GL, at, ac, ps, pb, pm, alarm, alum whls., new brakes, well maint., must sell by 1/30, no reasonable offer refused, $7,200 obo., 408-555-2547", 420, 401), #(157, "Sport-Utility", "Isuzu Trooper", 1992, 12000, "1992 Isuzu Trooper, exlnt. cond., alarm, bike/surf racks inclu., moving to Europe, must sell, $12,000. 415-555-3458", 398, 240), #(158, "Sport-Utility", "Isuzu Trooper", 1992, 13000, "1992 Isuzu Trooper, only 38k miles, 5 spd., fully equipped, CD/cass. blk ext. w/ gray int. $13,000 obo, 510-555-5684", 381, 160), #(159, "4-Door Sedan", "Volvo", 1991, 12000, "1991 Volvo, intercooler, red w/ tan leather int. only 30k miles, like new, ABS, pwr seats, windows, must sell, $12,000 415-555-6352",129, 365), #(160, "4-Door Sedan", "Volvo", 1992, 13000, "1992 Volvo, intercooler, air bags, ABS, fully loaded, CD/ cass., pwr everything, $13,000 obo 408-555-9658", 387, 171) ) local scriptDir := theScriptDir local titleDir := parentDir theScriptDir local theMediaDir := spawn scriptDir "carAds" -- Make the StorageContainer for the car database. local theLib := new LibraryContainer \ dir:titleDir \ path: "cars.sxl" \ mode:@create \ targetCollection:(new HashTable) for ad in classifiedData do ( local theFile := (ad[1] as String) local theFilename := theFile + ".bmp" local theStream := getStream theMediaDir theFileName @readable local bm := importMedia theImportExportEngine theStream \ @image @dib @bitmap append ad bm ) -- add to the container add theLib @data classifiedData close theLib ) "Compiled build ad database.sx" -->>>